FROM centos:7
MAINTAINER sunwenju

RUN yum install -y gcc  gcc-c++ make kernel-devel kernel-headers   \
    openssl-devel pcre-devel gd-devel \
    iproute net-tools telnet wget curl unzip perl vim nc && \
    yum clean all && \
    rm -rf /var/cache/yum/* && \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN cd /root && \
   wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz"  && \
    tar zxf jdk-8u141-linux-x64.tar.gz && \
   mv jdk1.8.0_141/  /usr/local/jdk

WORKDIR /root
ENV JAVA_HOME=/usr/local/jdk
ENV JRE_HOME=$JAVA_HOME/jre
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
ENV PATH=/sbin:$JAVA_HOME/bin:$PATH

CMD ["/bin/bash"]
